package cn.xgxd.web;

import cn.xgxd.result.Result;
import cn.xgxd.service.ForumMainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/forum/main")
public class ForumMainController {
    @Autowired
    private ForumMainService forumMainService;

    @GetMapping("/{id}")
    public Result findMainById(@PathVariable("id")  String id){
        return Result.success( forumMainService.getMainById(id));
    }
}
